package com.atguigu.gulimall.Auth.feign;

import com.atguigu.common.utils.R;
import com.atguigu.gulimall.Auth.vo.SocialUser;
import com.atguigu.gulimall.Auth.vo.UserLoginVo;
import com.atguigu.gulimall.Auth.vo.UserRegisterVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@FeignClient("gulimall-member")
public interface MemberFeignService {
    /**
     *   @RequestBody 必须和post请求方式配对
     * @param userRegisterVo
     * @return
     */
    @RequestMapping(value = "member/member/regist",method = RequestMethod.POST)
    R register(@RequestBody UserRegisterVo userRegisterVo);

    /**
     * 如果不指定  那么就会默认 为 get请求
     * @param loginVo
     * @return
     */
    @RequestMapping(value = "member/member/login",method = RequestMethod.POST)
    R login(@RequestBody UserLoginVo loginVo);


    @PostMapping("member/member/social/login")
    public R socialLogin(@RequestBody SocialUser socialUser);



}
